﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SmartWMS.Common.ResponseOutput;
using SmartWMS.Domain.SystemSet;
using SmartWMS.Server.BasicsDatumServer.ProductManagement.Dto;
using SmartWMS.Server.SystemSets.MessageCenterService;
using SmartWMS.Server.SystemSets.MessageCenterService.Dto;

namespace SmartWMS.API.Controllers.SystemSet
{
    /// <summary>
    /// 消息中心
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class MessageCenterController : ControllerBase
    {
        private readonly IMessageCenterService _messageCenterService;

        public MessageCenterController(IMessageCenterService messageCenterService)
        {
            _messageCenterService = messageCenterService;
        }


        /// <summary>
        /// 消息中心列表
        /// </summary>
        /// <param name="messageCenterSelectDto"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        [HttpPost]
        public Response<dynamic> MessageCenterGetList(MessageCenterSelectDto messageCenterSelectDto)
        {
            return _messageCenterService.MessageCenterGetList(messageCenterSelectDto);
        }


        /// <summary>
        /// 消息中心反填
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        [HttpPost]
        public Response<MessageCenterDto> GetSupplierManagementById(MessageCenterDto dto)
        {
            return _messageCenterService.GetSupplierManagementById(dto);
        }
    }
}
